<?php

/**
 * Created by PhpStorm.
 * User: dung
 * Date: 3/26/14
 * Time: 2:20 PM
 */
class Admin_Model_Video extends Zend_Db_Table
{
    protected $_name = 'film_data';
    protected $_primary = 'data_id';

    public function saveItem($arrParams = null, $options = null)
    {
        $row = !empty($arrParams['Data']['data_id']) ? $this->fetchRow('data_id = ' . $arrParams['data']['data_id']) : $this->fetchRow();
        foreach($arrParams['data'] as $key =>$value)
            $row->{$key} = $value;
        $row->save();
    }
} 